import 'package:flutter_taotaoshipin/generated/json/base/json_field.dart';
import 'package:flutter_taotaoshipin/generated/json/user_drama_collect_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class UserDramaCollectEntity {
	String? title;
	String? cover;
	@JSONField(name: "main_id")
	int? mainId;
	@JSONField(name: "all_ep")
	int? allEp;
	int? sort;
	@JSONField(name: "drama_name")
	String? dramaName;
	@JSONField(name: "drama_id")
	int? dramaId;
	String? vid;
	int? ctime;

	UserDramaCollectEntity();

	factory UserDramaCollectEntity.fromJson(Map<String, dynamic> json) => $UserDramaCollectEntityFromJson(json);

	Map<String, dynamic> toJson() => $UserDramaCollectEntityToJson(this);

	UserDramaCollectEntity copyWith({String? title, String? cover, int? mainId, int? allEp, int? sort, String? dramaName, int? dramaId, String? vid, int? ctime}) {
		return UserDramaCollectEntity()
			..title= title ?? this.title
			..cover= cover ?? this.cover
			..mainId= mainId ?? this.mainId
			..allEp= allEp ?? this.allEp
			..sort= sort ?? this.sort
			..dramaName= dramaName ?? this.dramaName
			..dramaId= dramaId ?? this.dramaId
			..vid= vid ?? this.vid
			..ctime= ctime ?? this.ctime;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}